// JavaScript Document

$(function(){
	
	$(".share").click(function(){
		ShowDIV("share");
		GetShare();
	});
	
	$("#BgDiv").click(function(){
	  $("#BgDiv").css("display","none");
	  $(".textarea").css("display", "none");
	});
	
});

function ShowDIV(thisObjID) {
       $("#BgDiv").css({ display: "block", height: $(document).height() });
       var yscroll = document.documentElement.scrollTop;
       $("#" + thisObjID + "" ).css("top", "100px");
       $("#" + thisObjID + "").css("display", "block");
       document.documentElement.scrollTop = 0;
 }
 
function GetShare(){
	var hasPlayed = "我正在使用微博应用--我弹我听http://www.scnutn.com/demo/ntwt/";
	if(window.played)
	    hasPlayed += "\n我刚刚弹奏了《"+window.played+"》";	
	/**
	$.post("?m=Index/Piano/AjaxShare",{},function(data){
		$("#shareArea").html(data.share.con+hasPlayed);
	},"json");
	**/
	$("#shareArea").html(hasPlayed);
}

